package com.chinasofti.nio;

import java.nio.ByteBuffer;

public class CreateByteBuffereDemo {
    public static void main(String[] args) {
//        method1();
//        method2();
        ByteBuffer byteBuffer2 = ByteBuffer.wrap("aaa".getBytes());
        for (int i = 0; i < 3; i++) {

        }System.out.println(byteBuffer2);

    }

    private static void method2() {

    }

    private static void method1() {
        ByteBuffer byteBuffer1 = ByteBuffer.allocate(5);
//        for (int i = 0; i < 5; i++) {
//            System.out.println(byteBuffer1.get());
//        }
        System.out.println(byteBuffer1.get());
    }
}
